const { build, pause, concat } = require('../build');

var files = [
	"cutils",
	"dtoa",
	"libunicode",
	"libregexp",
	"quickjs",
]
var cppfiles = [
]

var proc = async () => {
	var hardFloat = process.argv[2] == "hardFloat";
	var cpp = false;
	var param = ["-I./glibc"];

	var targets = [];
	for (var i = 0; i < files.length; i++) {
		var ret = await build("quickjs/" + files[i], hardFloat, cpp, param);
		targets.push(ret);
	}
	for (var i = 0; i < cppfiles.length; i++) {
		var ret = await build("quickjs/" + cppfiles[i], hardFloat, true, param);
		targets.push(ret);
	}

	concat(targets, "quickjs.s");

  console.log("finish");
	//pause();
}
proc();

//setTimeout(() => { }, 100000);
